package com.jy.modules.cims.component.api;

/**
 * @description 接口Enum
 * @author shengzhoutao
 * @Date 2016-11-15
 */
public enum SendInterfaceEnum {
	/******************************************
	 ***************** 贷款转出 ******************
	 ******************************************/
	/**
	 * 进件调配完成通知
	 */
	LOAN_NOTICE_FINISH("jy.loan.allocation.finish", "进件调配完成通知"),

	/**
	 * 查询贷款审批结果
	 */
	SEARCH_AUDIT_RESULT("jy.loan.audit.search", "查询贷款审批结果"),

	/**
	 * 查询贷款放款结果
	 */
	SEARCH_LOAN_RESULT("jy.loan.loan.search", "查询贷款放款结果"),

	/**
	 * 进件终止
	 */
	ABORT_LOAN("jy.loan.abort", "进件终止"),

	/**
	 * 贷款回购通知
	 */
	REDEMPTION_LOAN_NOTICE("jy.loan.redemption.notice", "贷款回购通知"),

	/**
	 * 查询放款电子签章附件信息
	 */
	SEARCH_LOAN_SIGNATURE("jy.loan.signature.search", "查询放款电子签章附件信息"),
	
	/**
	 * 查询贷款还款计划信息
	 */
	SEARCH_LOAN_REFUNDPLAN("jy.loan.refundplan.search", "查询贷款还款计划信息"),

	/******************************************
	 ***************** 债权转让 ******************
	 ******************************************/
	/**
	 * 债权调配完成通知
	 */
	CREDIT_NOTICE_FINISH("jy.credit.allocation.finish", "债权调配完成通知"),

	/**
	 * 查询查询债权审批结果
	 */
	SEARCH_CREDIT_RESULT("jy.credit.audit.search", "查询债权审批结果"),

	/**
	 * 债权转让赎回通知
	 */
	REDEMPTION_CREDIT_NOTICE("jy.credit.redemption.notice", "债权转让赎回通知"),
	

	/**
	 * 查询债权还款计划信息
	 */
	SEARCH_CREDIT_REFUNDPLAN("jy.credit.refundplan.search", "查询债权还款计划信息"),

	
	/******************************************
	 ***************** 资金存管 ******************
	 ******************************************/
	/**
	 * 借款人开户结果查询
	 */
	SEARCH_FUNDS_ACCOUNTCHECK("jy.borrow.account.search", "借款人开户结果查询"),
	

	/**
	 * 借款人更改银行卡
	 */
	SEARCH_FUNDS_CARDUPDATE("jy.borrow.card.change", "借款人更改银行卡"),

	/**
	 * 借款人提现
	 */
	SEARCH_FUNDS_ACCOUNTDRAW("jy.borrow.account.draw", "借款人提现"),
	
	
	/**
	 * 放款提现查询
	 */
	SEARCH_FUNDS_ACCOUNTDRAWSEARCH("jy.borrow.account.withdrawals.search", "放款提现查询"),
	
	/**
	 * 划扣借款人银行卡
	 */
	DEBIT_FUNDS_ACCOUNTDCARD("jy.borrow.debit.card", "划扣借款人银行卡"),
	

	/**
	 * 代偿账户代还
	 */
	TRANSFER_FUNDS_ACCOUNTDTOREPAY("jy.transfer.to.borrow", "代偿账户代还"),
	

	/**
	 * 还款通知
	 */
	REPAYMENT_FUNDS_NOTICE("jy.repayment.notice", "还款通知"),
	
	/**
	 * 发送短信验证码
	 */
	MESSAGE_FUNDS_SEND("jy.send.message", "发送短信验证码"),
	
	/**
	 * 资产冻结接口
	 */
	FREEZE_FUNDS_ASSEST("jy.assest.freeze", "资产冻结接口"),
	
	;

	private SendInterfaceEnum(String interfaceCode, String interfaceDesc) {
		this.interfaceCode = interfaceCode;
		this.interfaceDesc = interfaceDesc;
	}

	/** API接口唯一编码 */
	private String interfaceCode;

	/** API接口名称或描述 */
	private String interfaceDesc;

	public String getInterfaceCode() {
		return interfaceCode;
	}

	public void setInterfaceCode(String interfaceCode) {
		this.interfaceCode = interfaceCode;
	}

	public String getInterfaceDesc() {
		return interfaceDesc;
	}

	public void setInterfaceDesc(String interfaceDesc) {
		this.interfaceDesc = interfaceDesc;
	}

	/**
	 * 
	 * @param interfaceCode
	 * @return
	 */
	public static SendInterfaceEnum getInterfaceEnumByInterfaceCode(String interfaceCode) {
		SendInterfaceEnum[] enums = SendInterfaceEnum.values();
		for (SendInterfaceEnum interfaceEnum : enums) {
			if (interfaceCode.equals(interfaceEnum.getInterfaceCode())) {
				return interfaceEnum;
			}
		}

		return null;
	}
}